package com.ytjj.qmyx.users.constants;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

@Component
@RefreshScope
public class NewWxConstants {

    /**
     * 微信小程序登陆固定参数
     */
    public static String WX_APPLET_LOGIN_GRANT_TYPE = "authorization_code";
    /**
     * 微信公众号appid(XXXX优选)
     */
    /** 公众号 **/

    /**
     * 微信公众号appid(XXXX优选)
     */
    public static String WX_MWEB_APPID = "wxaeba57eb86bcf6d7";

    /**
     * 微信公众号(XXXX优选)
     */
    public static String WX_MWEB_SECRET = "fce793048c03985dd0e6a3c47ff669f7";

    /**
     * 微信公众号appid(臻芯良品)
     */
    public static String WX_MWEB_APPID2 = "wx6536aee189c4f359";

    /**
     * 微信公众号(臻芯良品)
     */
    public static String WX_MWEB_SECRET2 = "71ebad828645f6ceb2288393a2109620";

    @Value("${wxConfig.WX_MWEB_APPID}")
    public void setWxMwebAppid(String value) {
        WX_MWEB_APPID = value;
    }

    @Value("${wxConfig.WX_MWEB_SECRET}")
    public void setWxMwebSecret(String value) {
        WX_MWEB_SECRET = value;
    }

    @Value("${wxConfig.WX_MWEB_APPID2:wx6536aee189c4f359}")
    public void setWxMwebAppid2(String value) {
        WX_MWEB_APPID2 = value;
    }

    @Value("${wxConfig.WX_MWEB_SECRET2:71ebad828645f6ceb2288393a2109620}")
    public void setWxMwebSecret2(String value) {
        WX_MWEB_SECRET2 = value;
    }
}
